package com.dgut.coal.dao;

import com.dgut.coal.entity.Purchase;
import com.dgut.coal.entity.Supplier;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: Yang
 * @Description:
 * @Date: Created in 23:16 2019/10/3
 * @Modifued BY:
 */
@Repository
public interface PurchaseDao {
    int commit(Purchase purchase);
    int save(Purchase purchase);
    List<Purchase> list(@Param("bill_number") String bill_number, @Param("state") Integer state);
    int deletePurchase(@Param("apply_id") Integer apply_id);
    int deleteMore(int[] ints);
    Purchase viewPurchase(@Param("apply_id") Integer apply_id);
    int updateCommit(@Param("purchase") Purchase purchase, @Param("edit_date") String edit_date);
    int updateSave(@Param("purchase") Purchase purchase, @Param("edit_date") String edit_date);

    List<Purchase> auditPur(@Param("apply_id") Integer apply_id, @Param("bill_number") String bill_number);

    int auditStatePass(@Param("apply_id") Integer apply_id);
    int auditStateReject(@Param("apply_id") Integer apply_id);

    List<Purchase> execList(@Param("bill_number") String bill_number, @Param("exec_state") Integer exec_state);

    int execFillPass(@Param("apply_id") Integer apply_id);

    List<Supplier> contract(@Param("apply_id") Integer apply_id);

    int count();

    int auditCount();

}
